<?php $common = new Admincp_Model_Common; ?>
<h3 style="margin: 10px 0 0 0; padding:0; text-align: center;">Thông tin khách hàng</h3>
<table class="list-records">
    <tr>
        <td style="width: 120px;">Họ và tên:</td>
        <td><?php echo $this->cart['fullname']; ?></td>
    </tr>
    <tr>
        <td>Địa chỉ:</td>
        <td><?php echo $this->cart['address']; ?></td>
    </tr>
    <tr>
        <td>Email:</td>
        <td><?php echo $this->cart['email']; ?></td>
    </tr>
    <tr>
        <td>Điện thoại:</td>
        <td><?php echo $this->cart['phone']; ?></td>
    </tr>
    <tr>
        <td>Nội dung:</td>
        <td><?php echo $this->cart['description']; ?></td>
    </tr>
    <tr>
        <td>Ngày gửi đơn hàng:</td>
        <td><?php echo $common->formatDatetime($this->cart['create_date']); ?></td>
    </tr>
    <tr>
        <td>Tình trạng:</td>
        <td><?php echo (($this->cart['status'] == 1) ? 'Đã hoàn thành' : 'Chưa hoàn thành'); ?></td>
    </tr>
</table>

<h3 style="margin: 10px 0 0 0; padding:0; text-align: center;">Thông tin đơn hàng</h3>
<div class="content">
    <table class="list-records">
        <tr class="list-header">
            <td style="width: 30px">STT</td>
            <td style="width: 250px;">Tên sản phẩm</td>
            <td style="width: 120px;">Kích thước</td>
            <td style="width: 60px;">Số lượng</td>
            <td style="width: 100px">Giá (VNĐ)</td>
            <td style="width: 100px">Tổng số (VNĐ)</td>
            <td style="width: 100px">VAT (VNĐ)</td>
        </tr>
        <?php if(count($this->data) > 0) :
            $common = new Admincp_Model_Common();
            $i = 0;
            $total = 0;
            foreach($this->data as $value) :
                $i++;
                $total += $value['price'] * $value['quantity'];
        ?>
        <tr>
            <td><?php echo $i; ?></td>
            <td><?php echo $value['name']; ?></td>
            <td><?php echo $value['size']; ?></td>
            <td style="text-align: center;"><?php echo $value['quantity']; ?></td>
            <td style="text-align: right;"><?php echo $common->formatMoney($value['price']); ?></td>
            <td style="text-align: right;"><?php echo $common->formatMoney($value['price'] * $value['quantity']); ?></td>
            <td style="text-align: right;"><?php echo $common->formatMoney(($value['price'] * $value['quantity'] + ($value['price'] * $value['quantity'] * 10) / 100)); ?></td>
        </tr>
        <?php endforeach; ?>
        <tr>
            <td colspan="5" style="text-align: right;"><b>Tổng tiền</b></td>
            <td style="text-align: right; color: #CC0000;"><b><?php echo $common->formatMoney($total); ?></b></td>
            <td style="text-align: right; color: #CC0000;"><b><?php echo $common->formatMoney(($total + $total * 10 / 100)); ?></b></td>
        </tr>
        <?php else : ?>
        <tr>
            <td colspan="7" style="font-style: italic;">Không tìm thấy kết quả nào</td>
        </tr>
        <?php endif; ?>
    </table>
</div>